import inquirer from "inquirer"; // 命令行交互工具，可以实现命令行的选择功能，输入功能
import chalk from "chalk"; // 颜色
import { projectTypeList, templateList } from '../config'

const text = chalk.bold;

export async function query(options: any) {
  const data = [{ type: 'list', message: '选择模版查询', name: 'template', choices: projectTypeList }]
  const content = await inquirer.prompt(data)

  templateList.filter((item) => item.type === content.template).forEach((v) => {
    console.log(text.blue(v.name))
  })
}